package java虚拟机;

import static java.lang.invoke.MethodType.methodType;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.Arrays;

/**
 * @author juntao zhang
 */
public class HelloWorld {
//  public Runnable r= ()->{};

//  public void doing() throws Throwable {
//    MethodHandles.Lookup lookup = MethodHandles.lookup();
//    MethodType type = methodType(String.class, int.class, int.class);
//    MethodHandle mh = lookup.findVirtual(String.class, "substring", type);
//    String result = (String) mh.invoke("Hello", 2, 4);
//    System.out.println(result);
//  }

  public static void main(String[] args) {
    Runnable r = () -> System.out.println(Arrays.toString(args));
    r.run();
  }
}
